Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Accessing UNIX Storage Objects

QuickDraw 3D provides routines for creating and managing UNIX storage objects.

You need to link your application with the standard I/O library to use these functions.

Q3UnixStorage_New

You can use the Q3UnixStorage_New function to create a new UNIX storage object.

TQ3StorageObject Q3UnixStorage_New (FILE *stdFile);
stdFile
A pointer to a file. This file must already be open.

DESCRIPTION

The Q3UnixStorage_New function returns, as its function result, a new UNIX storage object associated with the file specified by the stdFile parameter. The specified file is assumed to be open, and it must remain open as long as you use the returned storage object. In addition, you are responsible for closing the file once the associated storage object has been closed or disposed of. If Q3UnixStorage_New cannot create a new storage object, it returns the value NULL .

ERRORS

kQ3ErrorOutOfMemory kQ3ErrorNULLParameter

Q3UnixStorage_Get

You can use the Q3UnixStorage_Get function to get information about a UNIX storage object.

TQ3Status Q3UnixStorage_Get (TQ3StorageObject storage, FILE **stdFile);
storage
A UNIX storage object.
stdFile
On entry, a pointer to a FILE structure. On exit, a pointer to the FILE structure associated with the specified UNIX storage object.

DESCRIPTION

The Q3UnixStorage_Get function returns, through the stdFile parameter, the FILE structure associated with the UNIX storage object specified by the storage parameter.

ERRORS

kQ3ErrorAccessRestricted kQ3ErrorInvalidObjectParameter

Q3UnixStorage_Set

You can use the Q3UnixStorage_Set function to set information about a UNIX storage object.

TQ3Status Q3UnixStorage_Set (TQ3StorageObject storage, FILE *stdFile);
storage
A UNIX storage object.
stdFile
A pointer to a FILE structure.

DESCRIPTION

The Q3UnixStorage_Set function sets the FILE structure associated with the UNIX storage object specified by the storage parameter to the structure specified by the stdFile parameter.

SPECIAL CONSIDERATIONS

You must not use Q3UnixStorage_Set with an open UNIX storage object.

ERRORS

kQ3ErrorAccessRestricted kQ3ErrorInvalidObjectParameter kQ3ErrorStorageIsOpen

Q3UnixStorage_GetType

You can use the Q3UnixStorage_GetType function to get the type of a UNIX storage object.

TQ3ObjectType Q3UnixStorage_GetType (TQ3StorageObject storage);
storage
A UNIX storage object.

DESCRIPTION

The Q3UnixStorage_GetType function returns, as its function result, the type of the UNIX storage object specified by the storage parameter. The types of UNIX storage objects currently supported by QuickDraw 3D are defined by this constant:

kQ3UnixStorageTypePath

If the specified memory storage object is invalid or is not of this type, Q3UnixStorage_GetType returns the value kQ3ObjectTypeInvalid .

ERRORS

kQ3ErrorNoSubclass kQ3ErrorInvalidObjectParameter kQ3ErrorNULLParameter


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |